package ws;

import java.util.HashMap;

import com.google.gson.Gson;

import clases.CineORM;

public class CineORMWS {
	public String getSala() {
		HashMap<String, Object> map = new HashMap<String, Object>();
		CineORM c = new CineORM();
		map.put("Titulo", "Salas");
		map.put("Contenido", c.getSalas());
		Gson gson = new Gson();
		return gson.toJson(map);
	}

	public int addSala(String salaJson) {
		CineORM c = new CineORM();
		return c.addSala(salaJson);
	}

	public int upSala(String salaJson) {
		CineORM c = new CineORM();
		return c.updateSala(salaJson);

	}

	public int removeSala(int salaId) {
		CineORM c = new CineORM();
		return c.removeSala(salaId);
	}

}
